<?php

/**
 * This is core configuration file, Use it to configure core behavior of Cake
 */

// CakePHP Debug Level
Configure::write('debug', 2);

// Configure the Error handler used to handle errors for your application
Configure::write('Error', array(
	'handler' => 'ErrorHandler::handleError',
	'level' => E_ALL & ~E_DEPRECATED,
	'trace' => true
));

// Configure the Exception handler used for uncaught exceptions
Configure::write('Exception', array(
	'handler' => 'ErrorHandler::handleException',
	'renderer' => 'ExceptionRenderer',
	'log' => true
));

// Application wide charset encoding
Configure::write('App.encoding', 'utf-8');

// Session configuration
Configure::write('Session', array(
	'defaults' => 'php'
));

// A random string used in security hashing methods
Configure::write('Security.salt', 'D!Y@hG#9$3b%&0^qyJ&fI*xfs2(guVo)Uu-bWw`+vn~iR2{G}0Fg|aC,9>m.T"');

// A random numeric string (digits only) used to encrypt/decrypt strings
Configure::write('Security.cipherSeed', '76859309657453542496749683641');

/**
 * The class name and Database used in CakePHP's access control lists
 */
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');

//
Configure::write('Application.metaTitle', 'Cake框架');


/**
 * Configure the cache handlers that CakePHP will use for internal
 * metadata like class maps, and model schema.
 *
 * By default File is used, but for improved performance you should use APC.
 *
 * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
 *       Please check the comments in bootstrap.php for more info on the cache engines available
 *       and their settings.
 */
$engine = 'File';

// In development mode, caches should expire quickly.
$duration = '+999 days';
if (Configure::read('debug') > 0) {
	$duration = '+10 seconds';
}

// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
$prefix = 'myapp_';

/**
 * Configure the cache used for general framework caching. Path information,
 * object listings, and translation cache files are stored with this configuration.
 */
Cache::config('_cake_core_', array(
	'engine' => $engine,
	'prefix' => $prefix . 'cake_core_',
	'path' => CACHE . 'persistent' . DS,
	'serialize' => ($engine === 'File'),
	'duration' => $duration
));

/**
 * Configure the cache for model and datasource caches. This cache configuration
 * is used to store schema descriptions, and table listings in connections.
 */
Cache::config('_cake_model_', array(
	'engine' => $engine,
	'prefix' => $prefix . 'cake_model_',
	'path' => CACHE . 'models' . DS,
	'serialize' => ($engine === 'File'),
	'duration' => $duration
));
